package com.appspot.diasporajava.util;

import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Component;

import com.appspot.diasporajava.controller.MainController;

@Component
public class WebsiteVisitor {
	private Log log = LogFactory.getLog(MainController.class);

	public InputStream getInputStream(String address) {
		URL url;
		InputStream inputStream = null;
		try {
			url = new URL(address);
			inputStream = url.openStream();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		return inputStream;
	}
}
